import { observable, computed, action } from 'mobx';
import ApiHelper from './ApiHelper';
import { alliance_info } from '../constants/ApiTypes';

class Alliance {
    
    @observable info = null;
    @action async getInfo() {
        const result = await ApiHelper.requestPost(alliance_info);
        if (result.status) {
            this.info = result.info;
            return true;
        } else {
            this.info = null;
            return false;
        }
    }
}

export default new Alliance;